@mikegoatly@toot.community
@mikegoatly@toot.community avatar

mikegoatly

@mikegoatly@toot.community

Software developer, professional and hobby. Guitarist and pretend musician. You can expect me to post about building stuff with Visual Studio, VSCode, C#, .NET, TypeScript, React, Avalonia, Raspberry PI, Azure and Kubernetes.

I'm responsible for maintaining the LIFTI full text indexing library for .NET (https://github.com/mikegoatly/lifti), and I also build Chordle in my spare time (https://www.chordle.com)

Opinions my own, always reserving the right to change my mind.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

mikegoatly, to dotnet
@mikegoatly@toot.community avatar

Random #dotnet question. Can a source generator emit code that another source generator then processes?

This generator generates a [GeneratedRegex] https://gist.github.com/mikegoatly/fe36bc559e01b757c6ccb33d4020c8e9 , but the RegularExpressions generator doesn't pick it up, so compilation fails with the error:

Partial method 'RegexGeneratedClass.CapitalizedWords()' must have an implementation part because it has accessibility modifiers.

My guess is it's a limitation, but I might be doing something wrong!

mikegoatly, to azure
@mikegoatly@toot.community avatar

Helping a colleague troubleshoot an oddity - trying to get the details of a Key Vault using the with az keyvault show --name X but it errors out saying that an unrelated resource group could not be found. (Apparently the resource group did exist at one point, but has been deleted)

az keyvault list is empty, as is list-deleted, but the vault definitely exists.

mikegoatly,
@mikegoatly@toot.community avatar

Very strange... for some reason it's resolving the key vault to the wrong subscription and resource group

mikegoatly,
@mikegoatly@toot.community avatar

@martinpeck It was looking in the wrong subscription because they had logged out and not selected the right subscription again.

If we specify the resource group using az keyvault show --name X -g RESOURCEGROUP it works - without the explicit resource group name it tries to use the non-existent resource group.

It doesn't make sense given key vaults are global. I'm taking some steps to see if its possibly a bug in the CLI by trying the same steps with the Az PS modules.

mikegoatly,
@mikegoatly@toot.community avatar

@martinpeck For what it's worth the key vault shows up in the expected place in the Azure portal

mikegoatly,
@mikegoatly@toot.community avatar

@martinpeck PEBCAK

They had previously set az config set default.group to the old resource group and forgotten about it ๐Ÿคฆ

davidallengreen, to random
@davidallengreen@mastodon.green avatar

Wildly different circumstances, of course, but both Post Office and Afghan war crimes inquiries show how weak ministers are in their own departments.

Post Office ministers were fed false information, Mercer was not given access to information he was asking for.

And as parliamentary accountability requires ministers to be responsible to parliament, there is a huge system failure.

Ministers cannot be meaningfully accountable if they are given false or no information by their departments.

GIGO

mikegoatly,
@mikegoatly@toot.community avatar

@davidallengreen Rory Stewart's Politics on the Edge book suggested similar scenarios encountered by him

mikegoatly, to dotnet
@mikegoatly@toot.community avatar

Huh... not sure I've ever done a for loop over a char before. The i variable name definitely feels off in this context.

mikegoatly,
@mikegoatly@toot.community avatar

@bitbonk Ranging over chars too! 'Tis a thing of beauty ๐Ÿ˜Š

mikegoatly,
@mikegoatly@toot.community avatar

@bitbonk though the char cast makes me suspect Range is implicitly casting to an int?

billseipel, to dotnet
@billseipel@fosstodon.org avatar

The behavior for the List<string> seems... weird.

I'm not quite certain it has the SAME instance for each iteration of the ForEach .

mikegoatly,
@mikegoatly@toot.community avatar

@bitbonk @billseipel +1 for switching to a regular foreach.

Assuming the awaited method is truly async (i.e. waiting on I/O), the foreach is going to work its way through each of the entries in measures and kick off all the async methods at the same time. reconnedProjectIds will be empty for every single one.

khalidabuhakmeh, to random
@khalidabuhakmeh@mastodon.social avatar

System.Text.Json loves throwing exceptions. Iโ€™m surprised there isnโ€™t a โ€œIs this JSONโ€ kind of method.

mikegoatly,
@mikegoatly@toot.community avatar

@KirillOsenkov @khalidabuhakmeh Ok, I'm keen to get your insights... Assuming that this is about parsing something into an object, the alternatives to throwing an Exception when the JSON is malformed are:

  1. Return null. Not really an option; "null" is technically something that parsing JSON could come back with, and it's not clear what went wrong anyway
  2. Return a tuple. First param is a status enum, e.g. "Successful", "Malformed", etc, second is the T. Also an additional param for the error?
djlink, (edited ) to gamedev
@djlink@mastodon.gamedev.place avatar

A couple free & open-source Engines and game frameworks you can use today as alternatives. Feel free to comment with more.

Godot - https://godotengine.org
MonoGame - https://www.monogame.net/
FNA - https://fna-xna.github.io/
SDL - https://www.libsdl.org/
SFML - https://www.sfml-dev.org/
Adventure Studio - https://www.adventuregamestudio.co.uk/
bgfx - https://github.com/bkaradzic/bgfx
armory3d - https://armory3d.org/
ogre3d - https://www.ogre3d.org/
Renpy - https://www.renpy.org/

#gamedev

mikegoatly,
@mikegoatly@toot.community avatar

@djlink In case no-one else has mentioned it, @isadora is working on an open source C# game engine as well: https://github.com/isadorasophia/murder

djlink, (edited ) to random
@djlink@mastodon.gamedev.place avatar

Only one can exist!

mikegoatly,
@mikegoatly@toot.community avatar

@djlink I would be very surprised if this goes any way other than Half Life

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • provamag3
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • ethstaker
  • Youngstown
  • everett
  • slotface
  • osvaldo12
  • rosin
  • mdbf
  • kavyap
  • DreamBathrooms
  • megavids
  • ngwrru68w68
  • Durango
  • modclub
  • cubers
  • khanakhh
  • Leos
  • tacticalgear
  • cisconetworking
  • vwfavf
  • tester
  • anitta
  • normalnudes
  • JUstTest
  • All magazines