@bradwilson@mastodon.social
@bradwilson@mastodon.social avatar

bradwilson

@bradwilson@mastodon.social

#Code #Motorcycles #Music #BoardGames #VideoGames #Photography #AntiFascist #AntiRacist #PostTheist #Feminist #EV #GreenEnergy #BlackLivesMatter | https://dotnet.social/@xunit's caretaker | He/him | 0.00115 miles tall

Previously: GitHub, Microsoft, and others.
Now: Living that retired life.

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

bradwilson, to dotnet
@bradwilson@mastodon.social avatar

I have found a weird "bug" in @xunit that I'm having trouble tracking down.

In 2.7.0 we shifted a SynchronizationContext that was always used to one that's now used conditionally (to support async void unit tests). Two users have come forward saying their tests are now hanging. I've identified deadlocks in one's code, but how strange is it that the removal of a feature surfaces a bug in someone else's code?

1/2

bradwilson,
@bradwilson@mastodon.social avatar

They end up with a different way for their continuations to get scheduled. It shouldn't in theory be any different, since everything should end up in the .NET ThreadPool but still, it seems to help. I'll be honest that I'm confused why. Is it our use of TaskCreationOptions.LongRunning that's breaking their logjam?

https://github.com/xunit/xunit/blob/57af1d9f0b18181631cf6aa3d40a9f950468b1bc/src/xunit.execution/Sdk/AsyncTestSyncContext.cs#L54-L68

https://github.com/xunit/xunit/blob/57af1d9f0b18181631cf6aa3d40a9f950468b1bc/src/common/XunitWorkerThread.cs#L31-L48

bradwilson, to climate
@bradwilson@mastodon.social avatar

It's a harsh reality when you realize you're not going to live long enough to see the utopia promised by sci-fi.

It's worse when you're worried that nobody will.

hotdogsladies, to random
@hotdogsladies@mastodon.social avatar
bradwilson,
@bradwilson@mastodon.social avatar

@hotdogsladies "Your favorite band's favorite band."

kpwags, to random
@kpwags@hachyderm.io avatar

I’m currently reading The Stand by Stephen King and just came upon a name that is making me consider re-reading the Dark Tower series.

bradwilson,
@bradwilson@mastodon.social avatar

@kpwags Dark Tower is so good. I just wish I hadn't read the afterward he warned us not to read.

Also, book 4 guts me every time. We know bad things are going to happen and he makes us fall in love with her anyways, the cruel and brilliant bastard.

JenMsft, to random
@JenMsft@mastodon.social avatar

There is a secret third option - people like me that hide their desktop icons

bradwilson,
@bradwilson@mastodon.social avatar

@JenMsft #1 looks like me having an off day 😂

jeremydmiller, to random
@jeremydmiller@hachyderm.io avatar

Let me preface this next statement by calling out that I am literally the author of the first, production worthy IoC container in the .NET space, but...

.NET systems should strive to use the IoC container much less than they commonly do now, and make that usage dirt simple. A little bit of functional decomposition is all it takes sometimes.

And stop depending on mock object libraries as a one size fits all crowbar for testability

bradwilson,
@bradwilson@mastodon.social avatar

@jeremydmiller An interesting side effect of this kind of testing comes when you're writing a library rather than an application. Do the testing hooks you've introduced into the production code get exposed to end users? Do you have a strategy to prevent end users from using them? Do you even need one?

peterritchie, to random
@peterritchie@mastodon.social avatar

Why do the antonyms of descending not include condescending?

bradwilson,
@bradwilson@mastodon.social avatar

@peterritchie Like how the antonym of progress is Congress? 😂

lynnwallenstein, to random
@lynnwallenstein@hachyderm.io avatar

Last night on the ship... Shannon is ready for the 80s night

bradwilson,
@bradwilson@mastodon.social avatar

@lynnwallenstein Those shoes :coolcat:

bradwilson, to music
@bradwilson@mastodon.social avatar

My curmudgeon filter kicks in when someone describes a song as "a bop" and assumes it's not for me. I might be in for "a jam", but mostly I'm looking for "a skull crusher".

Migueldeicaza, to random
@Migueldeicaza@mastodon.social avatar

Today I logged into Slashdot.org again.

Where did everyone go?

bradwilson,
@bradwilson@mastodon.social avatar
JasonPunyon, to math
@JasonPunyon@fosstodon.org avatar

Farey Sequences

bradwilson,
@bradwilson@mastodon.social avatar

@KirillOsenkov @JasonPunyon Except it's demonstrably wrong as illustrated. The second set of insertions are obviously 1/4 and 3/4, but labeled as 1/3 and 2/3. Count the segments.

bradwilson,
@bradwilson@mastodon.social avatar

@JasonPunyon @KirillOsenkov There are at least two things you could do:

  1. Measure it. That's why I said count the segments. There are five locations and four segments. Number all the locations from the left from 0 to 4. Your 1/3 mark is at the 1 spot, which means it's 1/4 (there are four segments, not 3).

  2. Reason about it. You're placing a dot half way between 0 and 1/2. (0+0.5)/2 is 0.25 (aka 1/4). Same for the other side: (0.5+1)/2 is 0.75 (aka 3/4).

bradwilson,
@bradwilson@mastodon.social avatar

@JasonPunyon @KirillOsenkov This of course is all based on the unstated (but seemingly illustrated) assumption that you're creating equal length segments every time you insert. 1/3 is between 0 and 1/2, but not where you've illustrated it to be.

lzg, to random
@lzg@mastodon.social avatar

deleted_by_author

  • Loading...
  • bradwilson,
    @bradwilson@mastodon.social avatar

    @lzg This bests my record by at least an hour 😂

    Plumbert, to HashtagGames
    @Plumbert@thecanadian.social avatar
    bradwilson,
    @bradwilson@mastodon.social avatar
    bradwilson, to random
    @bradwilson@mastodon.social avatar

    Attending the annual HOA meeting & elections, and the single family home owner attendance is about 3.5%.

    This is my first HOA, but that seems...discouragingly small.

    bradwilson, to Discord
    @bradwilson@mastodon.social avatar

    Unsolved mystery of the universe: Why does always have 15 updates when they update?

    bradwilson, to random
    @bradwilson@mastodon.social avatar

    I feel like I want to explore enough of Roslyn Source Generators so that we could remove 100% of the reflection code in @xunit.

    It could in theory have a massive impact on extensibility, and may require hooks so that 3rd parties can participate in the compile-time generation of the metadata model that would be needed to replace reflection.

    I also suspect this would nuke our ability to do source based discovery, though I'm not aware whether anybody is currently using it.

    bradwilson,
    @bradwilson@mastodon.social avatar

    The team that built source based discovery into Visual Studio did it without using our APIs, despite the fact that they've been there since 1.0. When you see Visual Studio doing a bad job of source based discovery for @xunit tests, that's why: they implemented their own 80% version and then abandoned the work there. In my opinion they were basically trying to solve a problem for an internal team and everything else was secondary.

    bradwilson,
    @bradwilson@mastodon.social avatar

    At this point I have zero reason to suspect that they'll ever open that model up and let us own that discovery code though we've been requesting it for as long as it has been a feature (a decade now? I can barely remember when the discussions first started). So killing our support for source based discovery might not be that big a deal at this point.

    scalzi, to random
    @scalzi@mastodon.social avatar

    Lossless audio sounds better than the MP3s I made in 2000, when I encoded them at the lowest viable resolution to get as many as possible on my Creative Nomad Jukebox. It does not sound notably better than the high-resolution encoded MP3s I make today. That said, when making music or uploading it to streaming, I do it with lossless files because in those situations, more information is better.

    https://gizmodo.com/lossless-audio-does-not-sound-better-than-mp3-1851341155

    bradwilson,
    @bradwilson@mastodon.social avatar

    @scalzi I rip everything to FLAC as a "perfect" archive, but then use an automated script to convert them to 256k MP3 for smaller size (for putting my music collection on my phone, for example). I stream the FLACs around the house at home.

    bradwilson, to Powershell
    @bradwilson@mastodon.social avatar

    I have replaced "cat" with "bat" in PowerShell, and written a "cat" function that makes it more useful to me. Bat is a replacement for cat that syntax highlights the output.

    I'm able to support:

    $ cat *.cs
    $ dir -r -fi *.cs | cat

    I have not yet been able to support piping, so that has to stay with invoking bat:

    $ curl -ks https://sh.rustup.rs | bat

    (I'm not 100% sure if I can support both piping from raw text as well as piping filenames.)

    Script: https://gist.github.com/bradwilson/5b6d1ad8f797eee304f7028bf16253b2

    bradwilson,
    @bradwilson@mastodon.social avatar

    @talios Good eye, that's Iosevka.

    bradwilson,
    @bradwilson@mastodon.social avatar

    @talios I like it for my terminals because it's narrow and readable even at small sizes, which allows me to keep my terminal window narrower (right hand 1/3rd of my 4K screen).

    bradwilson,
    @bradwilson@mastodon.social avatar

    @talios I use Nerd Fonts for my prompt. I don't think Pragmata is available with all the extra icons.

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