|
insta posted:How do I safely "get into" an async/await stack if I'm not in one to begin with? When people shoot themselves in the foot with async, it's usually because they try to introduce async to codebase that wasn't using it, or trying to mix async and sync methods. Async is a nice and easy convenience if it's all the way down the stack. What fucks people up is trying to mix and match sync/async, or refactoring existing code to use async (especially code uses framework instead of core). It's possible to do either safely, but it can be a very expensive learning experience, as it's possible to introduce issues that will sail through test just fine and deadlock in production. I would suggest starting fresh and working through .NET core examples or playing with an existing open source project.
|
# ? Sep 16, 2020 03:23 |
|
|
# ? Jun 1, 2024 16:49 |
|
raminasi posted:Yes please don’t un-idiomatically use compiler internals directly just to save three lines of error handling code. MSDN Magazine suggested using GetAwaiter().GetResult() when you need to block a thread to wait; but underneath the wider and much better advice that you shouldn't be blocking threads to wait for tasks in the first place because it's a recipe for deadlocks no matter how you do it.
|
# ? Sep 16, 2020 09:28 |
|
New Yorp New Yorp posted:Old-days Microsoft would have. New-days Microsoft just says "eh, screw it, we lost the battle -- let's throw our support behind the winner". Sad part is I am really starting to believe it’s a better tool for 80% of .NET shops.
|
# ? Sep 17, 2020 02:34 |
|
e; never mind, UX dictates what I'm doing was a poor way to implement certain functionality anyways
Sab669 fucked around with this message at 15:32 on Sep 28, 2020 |
# ? Sep 28, 2020 13:40 |
|
I guess this is a .NET question? If not, let me know. I have a .netCore AWS Lambda project and I was wondering if there's a way to have different deployment config files (like in ASP.NET, web.debug.config, web.release.config) so I can deploy to different Lambda apps? Like have the following files: aws-lambda-tools-defaults.development.json => deploy to dev aws-lambda-tools-defaults.staging.json => deploy to staging aws-lambda-tools-defaults.production.json => deploy to production or using the serverless.template file? I can't quite seem to find the documentation I need for this.
|
# ? Oct 1, 2020 14:41 |
|
If you haven't updated to Visual Studio version 16.7.5 yet, don't; it's super unstable.
|
# ? Oct 1, 2020 18:06 |
|
Just-In-Timeberlake posted:I guess this is a .NET question? If not, let me know. dotnet lambda deploy-function -C staging Replacing staging with whatever configs (staging, production, development) you've defined.
|
# ? Oct 1, 2020 18:48 |
|
adaz posted:dotnet lambda deploy-function -C staging exactly what I was looking for, thanks
|
# ? Oct 1, 2020 18:56 |
|
Hammerite posted:If you haven't updated to Visual Studio version 16.7.5 yet, don't; it's super unstable. I've F#ed in it all day without problems. Think Resharper is the only big extension I have, perhaps another one is causing problems.
|
# ? Oct 1, 2020 19:06 |
|
Ola posted:I've F#ed in it all day without problems. Think Resharper is the only big extension I have, perhaps another one is causing problems. To my knowledge I don't have any extensions installed. I only updated today, but it crashed several times in a row, which doesn't give a good impression. It's been okay the last little while though.
|
# ? Oct 1, 2020 21:13 |
|
Any advice for consuming an API that returns data in kind of unhelpful formats? To give a sense of where I'm at, I'm pretty capable with PowerShell and have been intermittently learning C#. In the spirit of learning by doing, I'm trying to make a compiled PowerShell module to interact with the API of a product I use at work. Unfortunately, it's not a friendly REST API that spits out JSON, but rather an XML-RPC API that mostly returns strings. Take these two methods related to dealing with users: code:
code:
|
# ? Oct 2, 2020 01:57 |
|
Just checking, the API isn't WCF, is it? If so, you can generate client-side code with a single command that does *alllll* that crap for you.
|
# ? Oct 2, 2020 04:52 |
|
I'm so stumped. I've got an Azure Function that makes a connection to a cosmos database/container successfully. When I run through what seems to be a standard pattern of running a query against the container I get nothing. I typed up an example below of what I'm trying to do. iterator.HasMoreResults starts true but my breakpoint in the foreach never hits. The list is also empty on return.code:
code:
|
# ? Oct 2, 2020 07:54 |
|
Hammerite posted:If you haven't updated to Visual Studio version 16.7.5 yet, don't; it's super unstable. Water status: wet? Jokes aside, the release notes for this patch seem to only interest C++ coding, are you doing that?
|
# ? Oct 2, 2020 10:13 |
|
NihilCredo posted:Water status: wet? are you asking me specifically, or posing a question to a hypothetical reader who might upgrade? I touch C++ occasionally on our legacy apps but mostly do C#, to answer your question. I don't read the release notes for updates, I just let VS update when it tells me there's an update. Usually I don't regret doing that.
|
# ? Oct 2, 2020 11:07 |
|
Hammerite posted:are you asking me specifically, or posing a question to a hypothetical reader who might upgrade? Same, had a bunch of white screens of death just from interacting with c# projects. A great boost of confidence before they completely change how the .net ecosystem works in less than 2 months.
|
# ? Oct 2, 2020 11:11 |
|
insta posted:Just checking, the API isn't WCF, is it? If so, you can generate client-side code with a single command that does *alllll* that crap for you. 'Fraid not. I did run into some of the documentation on WCF data contracts during my initial searches, which is part of what gave me some hope that there was a better way to ingest from the API.
|
# ? Oct 2, 2020 15:55 |
|
Alan G posted:Same, had a bunch of white screens of death just from interacting with c# projects. A great boost of confidence before they completely change how the .net ecosystem works in less than 2 months. What does white screen of death mean here? Is VS failing so badly it’s bringing down your whole system?
|
# ? Oct 2, 2020 16:45 |
|
brap posted:What does white screen of death mean here? Is VS failing so badly it’s bringing down your whole system? When a WPF application like Visual Studio has a rendering hang, it leaves the application's window unpainted, which is usually white.
|
# ? Oct 2, 2020 17:20 |
|
Social Animal posted:I'm so stumped. I've got an Azure Function that makes a connection to a cosmos database/container successfully. When I run through what seems to be a standard pattern of running a query against the container I get nothing. I typed up an example below of what I'm trying to do. iterator.HasMoreResults starts true but my breakpoint in the foreach never hits. The list is also empty on return. Are you setting the partition somewhere else? That's the only thing I can think of off the top of my head, is you are - in code -just querying the wrong partition/db compared to your cosmos explorer
|
# ? Oct 2, 2020 18:31 |
|
adaz posted:Are you setting the partition somewhere else? That's the only thing I can think of off the top of my head, is you are - in code -just querying the wrong partition/db compared to your cosmos explorer Haha that was it! Thanks it was a similarly named db damnit that’s frustrating but what a relief. Thank you!
|
# ? Oct 2, 2020 19:20 |
|
Social Animal posted:Haha that was it! Thanks it was a similarly named db damnit that’s frustrating but what a relief. Thank you! scars from doing this a thousand times and realizing that i was pointing to wrong table/db/environment. You might want to consider instrumenting your connections and having it log all queries + what db it's querying. AT least for lower environments and troubleshooting it rules. How to do so depends on what framework/orm you are using but isnt usually SUPER rough!
|
# ? Oct 2, 2020 21:34 |
|
Ola posted:I've F#ed in it all day without problems. Think Resharper is the only big extension I have, perhaps another one is causing problems.
|
# ? Oct 2, 2020 22:48 |
|
adaz posted:scars from doing this a thousand times and realizing that i was pointing to wrong table/db/environment. I’ll look into this. It’s not common for me to make new cosmos connections like this and honestly I think it’ll be on my mind next time I do.
|
# ? Oct 2, 2020 23:27 |
|
I'm just going to make a quick post to plug my project.log thread about writing a static web app in Blazor. I thought it might be of interest to some readers of the .NET thread.
|
# ? Oct 4, 2020 23:21 |
|
Hammerite posted:I'm just going to make a quick post to plug my project.log thread about writing a static web app in Blazor. I thought it might be of interest to some readers of the .NET thread.
|
# ? Oct 4, 2020 23:41 |
|
mystes posted:They probably just haven't gotten around to adding f# support to the new bugs yet. That's harsh.... but probably true
|
# ? Oct 5, 2020 07:19 |
|
mystes posted:I realize that the point is just to demonstrate a static web app in Blazor, but neither this post, the project.log thread, the github page, or the actual site give even the slightest indication of what the blessed thing actually does, which seems like some sort of new record. Sorry, I figured no one would care about that if they were just looking at it from a technical perspective. It is helping out with the game mechanic described on this page, but an executive summary would be: it is some video game bullshit.
|
# ? Oct 5, 2020 11:24 |
At some point in September, my brain finally clicked into place and began building new routines to replace covid-destroyed ones. One of my partners has a background in self-taught coding, and informed me that visual studio had a good free edition these days, and then I blasted through the intro to c# course on codecademy. Right now, I'm trying to figure out what my next step is. I am more or less self directed right now. Learning how to do stuff that wasn't covered, or covered well, by the course i've taken. The followup offering on codecademy, is about c# and ASP, and while it seems like a loving cool next step, their teaching environment has a hideously low user cap for the ASP stuff, and tbh the answer checker is busted as gently caress, so I gave up. I have an ancient java-based comp-sci course in my past; in my noggin, that probably made getting back to this point *far* easier and faster than it is for most starting blind, but yeah... I've got a "C# masterclass" course my partner picked up, where a guy awkwardly puts code on the screen without explaining anything. That's useful as a jumping off point, and I've found some stuff on Skillshare that's similarly useful for short-topic dives. Insofar as I actually know what I want, I think I'm looking for, I think I'd like to find some solid resources on LINQ+C# operations, because that's what my course finished on, but did frustratingly little with. I'd also just generally like resources that might firm up a foundation I can turn into a career. I want to also make like, 2D games as a hobby, and anything in that direction is fine, but I'm principally trying to get skills to escape the culinary industry, as I've been made aware that I could just... do that. Riot Bimbo fucked around with this message at 11:29 on Oct 13, 2020 |
|
# ? Oct 13, 2020 11:26 |
|
Riot Bimbo posted:At some point in September, my brain finally clicked into place and began building new routines to replace covid-destroyed ones. Write a web API in C#, then write a front end to interact with it in React. That's a safe career path these days. You can run everything locally so no need to spend on cloud stuff, but if you move it to the cloud then you'll get some nice bonus skills. I don't know about any particular tutorials other than the top obvious search results, such as this: https://dotnet.microsoft.com/apps/aspnet/apis There are probably many other ones, perhaps someone else has a good suggestion. Before you get the front end running you can use a client like Postman to call the API https://www.postman.com/. You'll basically want to implement a fake database in C#, which is just the typical beginner stuff like write a list of your favorite fruits and filter it for green ones etc. Then you'll write an API that takes web requests such as GET http://yourserverhere/fruits/favorites/green, looks up to relevant data in the fake database, then returns it to the client in some serialized form such as JSON, and hopefully written in such a way that it's easy to swap which database you connect to and how you serialize it. If you don't know some or all of this terminology, you'll learn it during or after the tutorial.
|
# ? Oct 13, 2020 13:23 |
|
Riot Bimbo posted:At some point in September, my brain finally clicked into place and began building new routines to replace covid-destroyed ones. To add to the previous answer, check out this blog post with links to a git repo https://medium.com/@michaeldimoudis...er-6d31cdd6d3f5 The git repo code will handle all the grunt work to spin up a serverless AWS Lambda/CloudFormation stack with a CloudWatch lambda warmer to keep the functions from going dormant. You get something like 1M lambda function calls/month so it won’t cost anything. Spin up a cheap/free RDS instance and you can work on your database integration. AWS Lambda makes API development a cinch.
|
# ? Oct 14, 2020 00:12 |
Just-In-Timeberlake posted:To add to the previous answer, check out this blog post with links to a git repo I feel like a doofus but I am not at a point where this blog post provides enough info to get this running properly right off the bat. I think I'll go a little meta and endeavor to learn how to understand what the hell I'm doing here. That's the best I can do, since this is kind of the direction I wanna go.
|
|
# ? Oct 15, 2020 00:37 |
|
Riot Bimbo posted:I feel like a doofus but I am not at a point where this blog post provides enough info to get this running properly right off the bat. I think I'll go a little meta and endeavor to learn how to understand what the hell I'm doing here. That's the best I can do, since this is kind of the direction I wanna go. You can download the code and just run it locally with no extra configuration and use Postman to test your code. When you want to get to the point of spinning up a serverless stack on AWS you can mess around with the config files (it’s actually not as hard as it seems)
|
# ? Oct 15, 2020 02:34 |
|
I have a feeling I'm going to be posting about XAML stuff for awhile since I'm toying with NoesisGUI inside Unity 3d. I figured it's more XAML than Unity 3d so I figured I'd post here instead. I'd like to add custom tags into some text to insert icons. In this case, the tags are for player actions from the controller and the icons would be the keys/buttons/whatever currently bound to the action. So I want to have something like "[icon(s) for MainMenu][icons(s) for Abort] Return To Game." I can put some controller code on top of everything to parse the text myself and do the insertions in a rather ham-fisted way, but I am thinking that XAML and WPF has something cooler for this kind of thing. The other reason to look for better is that I'm hoping there's some indirection I can use to help change those icons if they get dynamically remapped. Is there anything better? I can worry about if cool stuff actually works with NoesisGUI or not myself.
|
# ? Oct 15, 2020 16:46 |
Just-In-Timeberlake posted:You can download the code and just run it locally with no extra configuration and use Postman to test your code. if that's the case, neat!
|
|
# ? Oct 15, 2020 18:35 |
|
Rocko Bonaparte posted:I have a feeling I'm going to be posting about XAML stuff for awhile since I'm toying with NoesisGUI inside Unity 3d. I figured it's more XAML than Unity 3d so I figured I'd post here instead. It's been years since I've done XAML/WPF stuff, but it seems like it would be pretty simple to implement a data converter that handles that. You'd still have to implement the parsing, but it would be called automatically for any binding that used that converter.
|
# ? Oct 15, 2020 20:59 |
|
chglcu posted:...implement a data converter... Is "value converter" the magic phrase? I got a bunch from that and wanted to confirm before I crawl down that rabbit hole.
|
# ? Oct 15, 2020 23:59 |
|
Rocko Bonaparte posted:Is "value converter" the magic phrase? I got a bunch from that and wanted to confirm before I crawl down that rabbit hole. Yeah, implement IValueConverter, which means specifying how to Convert and then ConvertBack the data referred to by your binding. Here's an example that converts strings to bools and back.
|
# ? Oct 16, 2020 00:11 |
|
So I'm starting to work with publishing nuget packages with .Net core, and a big thing I've been working with is making sure a proper set of StyleCop rules that are published by a nuget package for use in the different packages to ensure a consistent style consistency without forcing them to be required by any package that pulls them down. Is there a way to configure a nuget package to force a package to reference a library with PrivateAssets set to all by default to make them easier to pull down without modifying the .csproj file?
MadFriarAvelyn fucked around with this message at 01:07 on Oct 16, 2020 |
# ? Oct 16, 2020 01:04 |
|
|
# ? Jun 1, 2024 16:49 |
|
Rocko Bonaparte posted:Is "value converter" the magic phrase? I got a bunch from that and wanted to confirm before I crawl down that rabbit hole. Yeah, sorry that's what I meant. Like I said, it’s been a while. chglcu fucked around with this message at 01:24 on Oct 16, 2020 |
# ? Oct 16, 2020 01:10 |