Thursday, July 11, 2024

F# and OpenSilver v3.0

An update to the previous series of posts.

Having updated to the OpenSilver3.0 .vsix, the process of porting the standard astroclock test app from 2.1 to a newly minted 3.0 base solution was

  1. Add a global.json to keep the dotnet 9.0 pv SDK from being selected by default
  2. Copy the appliction source and resource files from the 2.1 project
  3. Add the extra files to the project - in this case, Computation.fs and textured_paper.png
  4. Adjust the app namespace in the browser and simulator projects
  5. And that's it.

The process was entirely transparent from the app and user experience point of view.

Only the one niggle - an obsolete code warning in the generated browser project persists from previous releases

Severity	Code	Description	Project	File	Line	Suppression State	Details
Warning (active)	CS0618	'WebAssemblyJSRuntime.InvokeUnmarshalled<T0, TResult>(string, T0)' is obsolete: 'This method is obsolete. Use JSImportAttribute instead.'	astroclock.opensilver3._0.Browser	D:\Github\astroclock\astroclock.opensilver3.0\astroclock.opensilver3.0\astroclock.opensilver3._0.Browser\Interop\UnmarshalledJavaScriptExecutionHandler.cs	19		

The code lives here.

Now when life quietens down, I shall have to port my other work-in-progress project, that has been languishing for several months now, from 2.1 to 3.0 as well.

Sunday, June 30, 2024

24H1 Cycling

Q1 was generally mild - only one cold day where I tried off-road riding on frozen gound - to the extent that in February I did a 25+ mile ride for a pub lunch; but generally it was all just plodding business rides, or an occasional breath of fresh air, like going out to see snowdrops in January.

The quarter started with 604.89 on the winter bike, 250.5 on the folder, and 4563.1 on the summer bike

Off-road going - and still flooded late June

End of January went to 886.05, 267.84 and 4576.6 for 312 miles.

February floods

End of February went to 1127.68, 267.84 and 4593.7 for 258.73 miles (570.73 YTD).

Thriplow daffodils

End of March went to 1422.51, 272.75 and 4593.7 with about 0.5 miles off-meter, total 300.24 miles (870.97 TYD).

Q2 was generally wet and often cool - winter gear kept being put away and then pulled out again into mid June, though some long rides did get done. At the end of April a first long ride through St. Ives and Wyton to scope out parking for a boat trip that got cancelled while I was on the road, then back through Huntingdon. Like last year, the weather then went downhill, and on the Reach Ride, I just about got home ahead of the rain.

I did get some longish rides for fun done, exploring around Northstowe, and making an exploratory ride to St. Ives to locate parking for a cream tea to be held in June, as well as just pounding the local lanes for fresh air on the occasional warm day.

Having ended Q1 with about 50 more miles done than last year, passing 2k miles for the year on 5th June, 10 days earlier than last was a result of just keeping up the pace. And a holiday that went into hardy T-shirt weather at times, rather than long sleeves all the way, helped keep up the momentum. The weather becoming warm, and for a few days at the end of the month, actually hot, and a series of places to go, meant the miles piled on, even if some of the attempts on off-road routes found they were still going from parched to quagmire or flooded in the space of a few yards, and needing to call it off

Northstowe bridleway bridge open at last

End of April went to 1800.35, 285 and 4593.7 with about 1 mile off-meter, total 391.09 miles (1262.06 TYD).

Reach May Fair

End of May went to 2360.78, 285 and 4641.3, with about 7.4 miles off meter, for a total of 615.43 miles (1877.49 TYD).

River crossing

End of June went to 2594.1, 292.8, and 4825, with about 176.6 miles off meter for holiday, for a total of 601.42 miles (2478.85 TYD).

Monday, February 19, 2024

Anime 2023 and a bit

I took the opportunity to catch Suzume when it was playing at the local arthouse cinema. For the first film in-theatre in almost a decade, and first Shinkai since I noped out of 5cm/s at a frozen railway platform, it made a good occasion to get back into each of those.

First and foremost, the boy-meets-girl strand is not played as the core of the movie, but comes about 3rd or 4th in the queue, after such things as chasing trouble-making cats, and saving Japan when there aren't Yūsha or Tōji around to deal with a problem more of the sort they are geared up for. And it does have the visual lushness that we expect from a Shinkai movie. Nothing too profound, but certainly more than worth the time spent.

One remarkable thing about the movie, in retrospect, is that the associated McDonalds ad could be considered to contain a "canon deleted scene" - while there are many sponsors of the movie who have had co-promotions containing some excerpts (e.g. Narita Airport), the McD ad is one comprised entirely of animation, only part of which appears in the actual movie.

For TV shows, a glitch with Crunchy lasting from late July to mid November meant there was a big gap in watching, but the general quality of the airing shows meant that it hardly made a noticeable difference to my watching.

Released from the paywall, I finished LycoReco. Having started out as a cute girls do black ops series, it suffered the usual fate of series that start mostly episodic then grow a plot. The tale of a genki-girl natural born assassin who's all Sixth Commandment all the time doing clandestine peacekeeping activities would have been fine by itself, without bringing in a pound-shop Joker as a running antagonist. A sad case of a story having far more than just the one implausibility, almost an example of why you don't do that. Harmless to frustrating.

Birdie Wing (1st cour) suffers another of the standard anime tics. MC, who is a legend in the world of clandestine gambling golf, and sees off other mob-owned players on an amazing mutable underground course meets another player who might be her equal - and then gets a special entry into an Under-15s tournament to play against her. Yep, this legend with a significant track record is another 14 year old prodigy. Mid-cour, the mafia element wraps up and suddenly it's a Japanese high-school golf tournament in the same vein as, say, New Prince of Tennis, right up to the point where the cour ends and we have to wait for the second to air, a year after the first. Decent enough time-filler, pity about the cliff-hanger.

Yurei Deco, or The Adventures of Hack'n'Berry, Finn, and the Detective Club on Tom Sawyer Island was an interesting sub-Matrix style soft dystopia, with a couple of surprise (at least to me) gender reveals. I didn't notice whether there was any discussion of this elsewhere at the time, but it seemed one of those series that fly under the radar, and thus get under-appreciated. Good.

Shadows House S1 definitely speed-ran what was a long atmosphere building introduction to get to the first major event of the series, and its immediate consequences. S2 recovered well from the first season's uncertain adaptation, and reached a logical pausing point without rushing matters. Verdict: Good, recommended.

The Case Study of Vanitas - it's shoujo, it's silly, and if LycoReco is yuri-bait, then this is definite yaoi-bait. But then you expect a story of vampires in c1900s Paris to be full of raging haemosexuals anyway. In all, it was, let's say, interesting, though the mood whiplash from drama to slapstick and back got a little tiring after a while; but it's always interesting to see an anime take on places I've actually visited. Verdict: mostly harmless. Watch Brotherhood of the Wolf for a take on the same material as inspired the second cour that doesn't suffer from out of place levity.

Running through into the new year, from the backlog, Wonder Egg Priority which was a mess - so many things handwaved into the plot in the last few episodes to keep things happening, and then dropped or left dangling. Verdict - to travel hopefully is far better than to end in a soggy thud.

Ditto for Vivy : Fluorite's Eye Song which has the disadvantage of having become so dated in such a very short time. It kept itself together somewhat better at the end, though gave no explanation as to e.g. why going back a few more hours for the do-over to the do-over wasn't a thing. It was better when it was being an idol anime than anything else. I was amused by the ep 3 "Hotel Sunrise" disaster - of course it's a colony drop : with that name, it had to be.

Adding to the "and a bit", Caught The Boy and the Heron in the first week of January '24. It was OK (enough that I didn't feel annoyed about having to take my least favourite route home for night riding because of flooding on the quieter ones), but I feel that The Wind Rises would have stood as a better finisher, rather than doing one more encore. I wonder what his next movie will be. It felt to me that the film was rather about Miyazaki reconciling himself to the fact that Goro hasn't taken up the torch, and wonder about past events that might have surfaced in the film. Like that self-inflicted injury that I was sure was going to lead to wrath descending on the kid who'd bullied him, but went nowhere beyond writing the school back out of the story.

I tried a couple of episodes (prologue and Ep1) of G-Witch; and the former was a generic enough AU Gundam set up, seemingly entirely set aside in a first episode that hit the all beats of "Utena in Mobile-suits" (as has been the apparent summary of the series). Alas, Suletta is no Tenjou-san - indeed I can't offhand think of another example of such a wittering ninny as the eponymous witch in the MC role, at least in anything I stuck with. Haven't watched any further

Also, still in progress, a 20-years-later rewatch of Evangelion.

So that just leaves me with One Piece as an on-going thing, which is frankly better than most of the above for having less pretensions to start with.

Saturday, February 10, 2024

F# and OpenSilver v2.1

An update to the previous series of posts, just three months after the last one.

Compared to previous iterations, "it just works". The only changes from the original Silverlight code are

  • The XAML is precompiled where it stands in a new F# App project, rather than being loaded at runtime
  • The Y-coordinate related changes in the XAML and F# from 2.0 need to be applied
  • The background image is compiled as Content, and in the XAML, referred to by ImageSource="ms-appx://textured_paper.png", but is otherwise as before (note, I've change the background texture on my website in the last 15 years)

In particular, no messing about with IntermediateOutputPath, or having to create stubs for anything; as I said, "it just works".

Now it's all in one place, I've deployed a live version too.

Monday, January 01, 2024

Q4 Cycling

Keeping up the ride every day

The weather stayed good - T-shirt and shorts good - into mid-October, so gave the chance for a few late long rides out into the country, and off-road, too.

End of Butler's Lane

The month ended with Totals : winter bike reset to 0 (new odo), summer bike 4551.2 (up 429.4), folding bike 234.44 (unchanged) and 19.7 off meter for 449.1 total, 4053 YTD.

November was unremarkable, with one last long ride out to the Golden Ball for lunch. The month ended with Totals : winter bike 259.92, summer bike 4561.6 (up 10.4), folding bike 234.44 (unchanged) and 12.6 off meter for 282.92 total, 4336 YTD.

Abbey Bridge, 2 years on

December, too, was unremarkable, with no real wintry weather. The month ended with Totals : winter bike 604.89 (up 344.97), summer bike 4563.1 (up 1.5), folding bike 250.5 (up 16.06) and 6.92 off meter for 369.45 total, 4705 YTD, a new PR.

Wednesday, November 08, 2023

F# and OpenSilver v2.0 (Continued)

An update to the previous series of posts.

Building while NuGetting

While I stand by my assertion that the previous post showed the simplest way to build (by not using NuGet to get the package, but referencing the key assembly the old-fashioned way) here is how to build with OpenSilver 2.0.1 as a NuGet reference. First, add properties

    <SkipXamlPreprocessor>true</SkipXamlPreprocessor>
    <OpenSilverGenerateAssemblyInfo>false</OpenSilverGenerateAssemblyInfo>

then if there isn't already a $(ProjectName).OpenSilver.XamlDesigner.fs file in the root of the project (generated there by the OpenSilver compiler taking some untested path before it was switched off), it should look like this:

// <auto-generated>
//     Generated by the FSharp WriteCodeFragment class.
// </auto-generated>
namespace FSharp

open System
open System.Reflection


[<assembly: System.Runtime.CompilerServices.InternalsVisibleTo("XamlDesignerBackground")>]
do()

added with Compile Action of None, and then see it's copied into the appropriate place by

  <Target Name="FixUp" BeforeTargets="BeforeCompile;CoreCompile">
    <ItemGroup>
        <MisgeneratedFiles Include="$(ProjectName).AssemblyInfo.OpenSilver.XamlDesigner.fs"/>
    </ItemGroup>
    
    <Copy SourceFiles="@(MisgeneratedFiles)"
          DestinationFolder="$(IntermediateOutputPath)"
        />
  </Target>

Publishing less

In the browser project, rather than enabling AOT, which saves time, and not space, have properties

    <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
    <BlazorEnableCompression>false</BlazorEnableCompression>
    <!-- Uncomment to enable AOT compilation when publishing -->
    <!--<RunAOTCompilation>true</RunAOTCompilation>-->

and it doesn't hurt to switch of satellites in the Presentation project, either.

That takes us from

to

Thursday, November 02, 2023

F# and OpenSilver v2.0

An update to the previous series of posts following the v2.0 stable release of OpenSilver.

The good news is that proper F# support in promised in the pipeline, but for now we still have to do some work.

Proceed as before, but in the F# project that inherits from the abstract C# w/XAML, a NuGet based reference to OpenSilver 2.x invokes the XAML preprocessor, and adds a file in the intermediate output directory to the compilation list. I've not found any simpler way to suppress this than by side-stepping NuGet entirely for this project

    <Reference Include="OpenSilver">
      <HintPath>$(NuGetPackageRoot)opensilver\2.0.1\lib\netstandard2.0\OpenSilver.dll</HintPath>
    </Reference>

and having to manage the version.

The other thing I noticed in 2.0 was that the sense of the Y-axis seems to have changed wrt render transforms, e.g. to draw a clock face with a series of lines radiating from a centre of (120,120) like this, rotations incrementing 30 degrees at a time, the negative Y values from 1.1 needed to be positive

        <Line
      Name="t1"
      X1="0" Y1="-108"
      X2="0" Y2="-100"
      Stroke="White"
      StrokeThickness="2">
          <Line.RenderTransform>
            <CompositeTransform Rotation="30" TranslateX="120" TranslateY="120" />
          </Line.RenderTransform>
        </Line>

and for the clock hands, add an extra 180 degrees as well as negating the Y values (that the unlabelled 1 o'clock and 7 o'clock lines have swapped makes no odds, but the hands are important).

The resulting code for running with v2.0 can be found here. The published code comes to ~130Mb, which is a lot chunkier than 25kb of JavaScript needed to do the job, but I guess it could be possible for many apps to share the same library files.

Saturday, October 07, 2023

An Engineer does (AI) Art - the beginning

I've been playing with automated image generation for a long time, starting with various bits of CGI for CAD in the day job, unglamorous things like dithering for 4-, 8- and 16-bit images, more interesting things like using depth maps to make line drawings out of architectural renders; and also using it for amateur art - for example, at least one cover of the Alarums and Excursions APAzine c1990.

When I stopped doing that for a day-job, it was rather more arm's length - seeing sites like "In 20 Years" (whose predictions must surely soon be testable), some site that would take a picture and render it in the style of El Greco - image above creation date 1-AUG-2009; then more recently (3 years ago) another face-to-portrait website, which rendered randomly in a variety of artists' styles

So when Stable Diffusion became available on HuggingFace last autumn, my first thoughts were "new profile pics using photos less than a decade old", but also "if this is intelligent, and takes pure text input, maybe I can illustrate the stories I wrote back in college days".

The former was quickly successful, as the image I adopted for my GitHub account shows

The latter was less successful - trying to prompt a character who on first glance looks like they stepped out of a black and white photograph seemed to be beyond its comprehension. But by the end of a second day trying, I had a limited proof of concept

Noodling around on HuggingFace, I was aiming for just one thing, a plausible cover illustration; but given the lack of control, it was a case of just rolling dem bones, until one day in early January, I got something so close, yet still so far.

soon after which I said enough is enough, and installed the Automatic1111 WebUI, in CPU only mode on the workstation I'd meant as a dev box in retirement. It might take 10 minutes for a single 512x512 or equivalent image, but finally I could start actually working with the tools.

To be continued...

Upcoming episode preview : how I'd render those last two pictures today

Tuesday, October 03, 2023

Q3 cycling

A ride every day, though either for some business, or on a few occasions, more than just a token couple of miles around the neighbourhood to make the every day happen.

A disappointing season, summer often wet, mostly cloudy and windy, at best sultry behind the wind, and few T-shirt days, only picking up with a belated spell of warn, clear, calm weather in September, so for most of the period the longest ride days are either multiple errands, or going to a moderately distant pub for lunch.

July was mostly a washout. Totals : winter bike reset to 0 (new odo), summer bike 3234.7 (up 371.4), folding bike 217.05 (up 41.1) and 13 off meter for 425.5 total, 2692 YTD.

August was not much better. Totals : winter bike still 0, summer bike 3610.3 (up 375.6), folding bike 234.44 (up 17.4) and 5.6 off meter for 398.6 total, 3090 YTD.

Birthday ride to new territory for a pub lunch

September brought belated summer, and rides to redo Little Cow Lane, and bits of the Ickneild Way, as well as long rides for pub lunches. Totals : summer bike 4121.8 (up 511.5), and 1.9 off meter for 513.4 total, 3604 YTD.

Tuesday, July 11, 2023

20 years of blogging

And what a time it's been, ranging from film reviews, proto-tweeting, holiday diaries, through random bits of programming stuff as I ran into it (and continue to run into, but at a lower rate these days), roughly annual anime reviews (cinema having fallen by the wayside) and lately, logging bike rides at quarterly intervals. And I guess how the last 5 years since retirement went will be how the next years go too.

Saturday, July 01, 2023

Q2 Cycling

A ride every day, though either for some business, or just a token couple of miles around the neighbourhood to make the every day happen.

A fairly nondescript quarter, generally cool and windy, with few T-shirt days.

April ended on a high note with one warm day where on a whim, I rode down to Bishop's Stortford to join a cycling provision rally (blue line on map) for a 52 mile round trip. Totals : winter bike 3459.4 (up 365.3), summer bike 2191.8 (up 58.8) and 0.6 off meter for 424.7 total, 1249 YTD.


May was disappointing, with continued cold NE winds, so almost all business rides until a badly timed holiday at the end of the month. Totals : winter bike 3610.5 (up 151.1), summer bike 2410.2 (up 218.4) and 78.2 off meter (holiday) for 447.7 total, 1697 YTD.

The cloud from the cold NE wind slowly burned off, leaving the end of the holiday slightly warmer, but June as a whole had few days that enticed me to rides for amusement's sake, and only one 40-miler.

Dullingham station

Still, I passed 2000 miles YTD on the 16th, only a day later than last year, despite fewer miles ridden each month in the spring. Totals : winter bike 3610.5 (no change), summer bike 2863.3 (up 453.1) and 116.5 off meter (holiday) for 569.6 total, 2266 YTD.

Monday, April 03, 2023

Q1 cycling

A ride every day, though either for some business, or just a token couple of miles around the neighbourhood to make the every day happen.

January was cool, ending cold, but generally dry. The long ride was scoping out the route to crem and wake for a friend's funeral, though on the day I ended up getting a lift from crem to wake and back. Despite other known cyclists amongst the mourners, none of them had braved the sub-zero temperatures. Just as well, given the state of the provision there

though I actually used one of the signposts in the car park as a hitching post.

Winter/black bike only, ending at 2569.1 + 1.5 off meter for 291.6 miles ridden for the month.

February, chill but dry, meant that towards the end of the month I could even use the bridleway for my routine trips, even if from time to time, the headwind and lingering soggy patches meant that some parts were wheeled. The long rides included scouting for, then attending, a screening appointment in Longstanton - and finding that some of the near finished cycleway by the Northstowe roundabout had been ripped up since I was there in the autumn

leaving the dual carriageway to Northstowe with no crossings over the crash barrier from the stub of the path. Ultra bad design.

Winter/black bike only, ending at 2873 for 303.9 + 4.3 off meter = 308.2 miles ridden for the month (599.8 YTD).

March, wet and at times stormy, was a bit of a collapse after the previous months, with no long business-related rides, and too cold/windy for the sort of long rides I was doing at the same time last year.

That was traversable by coasting through, with feet not getting too wet from the splashing; it lasted a few days, but the rain on the 31st resulted in another such flood, lingering into April.

Winter/black bike only, ending at 3094.1 for 221.1 + 3.4 off meter = 224.5 miles ridden for the month (824.3 YTD).

Monday, January 02, 2023

Anime 2022

aka the year Funiroll paywalled most things.

Still I did get to watch some things

Clearing up from the backlog -- Un-Go which was weird detective story in a near/alt-future Japan after a war, with a mix of AI, powersat-politics and battling kami : OK but who comes up with mix-and-match ideas like that to even make them work in the first place?

Heroic Age did what one pretty much might have expected from the initial (and well-trodden in the literature) premise, and thus did manage to stick a satisfactory ending.

Nobunagun turned out to be a fun take on the "super-powered school-girl vs alien greeblies" genre, when ditzy mil-otaku Sio goes all-in when she discovers she can channel Oda Nobunaga in the form of a Gatling gun with moar dakka-dakka. This had the weirdest take yet out of Japan for the secret identity of Jack the Ripper.

Schoolgirl Strikers was a more genre-pure instance of super-powered school-girls vs alien greeblies, with some added power of friendship -- it managed to do things right which Ange Vierge spectacularly fumbled, including having most off the non-combat sections being elsewhere than the hot tub.

In the "Cute Girls Do Cute Activity" corner, New Game! presented a very sanitized -- and very gender-bent -- view of the software development process; New Game!! was more of exactly the same, but I hope that code review, and check-in integration and testing, are handled better than in the anime, in the same way one hopes the code from Senko-san is not representative of real life.

When watched in binge mode, rather than weekly-as-aired, Space Brothers flows much better than it did at the time -- the introductory recaps can be ignored, along with the 3-episode mid-run total to-date recap. Watching 10 years on, there is also the amusement at the near future that has NASA getting to the moon again, with not a hint of SpaceX-style private space activity - at least not this side of the "now read the manga" last episode.

And for something completely different, Akiba's Trip, to see the context for the otaku memes it spawned (e.g. "It doesn't matter what a man's salary is worth; what matters is how much of it he spends on his hobbies!"). It lampoons one otaku hobby a week, including actual Street Fighter V gameplay footage in the vidya episode, before wrapping up with the big boss fight. Also, clothes get removed in every battle. Verdict : entirely harmless.

Interrupted by paywalling at the half-way point, C3 was just slightly weird; 18if, with its witch-of-the-week formula didn't leave things quite as hanging, and in places seemed to be unexpectedly good in its variety (cf Sengoku Collection). It also gets an honourable mention for the episode where the WotW is intending to kill three nasty pieces of work who killed her family - and while MC's mentor is all "then you'll be as bad as they are", the MC says in effect "sounds reasonable to me; do you need any help?", taking over for the boss bad's turn.

From the Winter season the one-shot Sorairo Utility was too short to establish real "a cute girls doing activity" scenario; Sabikui Bisco was crazy enough in its take on the "a random disaster strikes (at least) Japan, and things become weird and anarchic" genre to follow to the end, though the finale echoed Vividred Operation for the way all the characters spent time being heartfelt at each other while the big bad was charging up his lazors -- in all, too many crazy ideas, and not really enough establishing of conflict; and my reaction to Tokyo 24th Ward was simply this

Akebi's Sailor Suit didn't establish itself as an alternative CGD-whatever, and the weird art style didn't help motivate; I ended up finishing it as a backlog item. For most of the season after the first episode, it was not too far from being "creepy lesbian stalker sue adds girl of the week to her harem" (exceptions like the episode where the girl of the week is a stalker herself and they prowl together hardly count). After all these years, I confess that I don't understand the neuroticism about having/making friends in high-school that percolates some series (Uruhara being another example of same that springs to mind). Perhaps it's a girl thing. After a while one habituates to the slightly uncanny character designs, as it works towards the big sports' day climax - a change from the usual school festival trope. Verdict: harmless.

The charge of "too much crazy, too little establishment" for Sabikui Bisco can also be levelled at Spring's (gacha-game tie-in) series Estab-Life, which adds the one-style-fits-all 3DCG characters that are becoming too common these days, including an apparent high-school girl with a long track record as an operative (on a par with the Dirty Pair, but without the associated trail of destruction). In all, mostly harmless, somewhat silly.

At mid-year, everything got paywalled, so I only watched the teaser episodes of LycoReco, and was spared what sounded like a disappointing thud of an ending

With winter came Pui Pui Molcar : Driving School. After the first season's "everything goes" mayhem, it was hard to see where they could take it, but this new set-up makes sense. Which may be why it's just so-so. Still, a harmless few minutes of Saturday morning cartoon.

Q4 cycling

Overall mild, but wet in November, and cold in mid-December, so a steady background of utility rides, kept the numbers up.

Tree down

Despite the previous month's rain, such had been the drought that October remained off-road season, with firm going on bridleways. With mild weather and light in the afternoons, plenty of business rides, and a few longer ones to do things like checking the progress of the cycle-path signed to Longstanton, or the newly placed archaeological signs along the A1307.

End of the line at Northstowe

Totals at the end of the month 1862.2 on the old bike (+321.2), 2133 on the new (+87.3), for a total of 408.2 miles for the month, 4185 YTD.

Second load

November's weather was less clement, but, with old customs resuming, I did get the chance to use the trailer I'd bought for my birthday, to transport bits of old fencing that had been languishing for more than a year to the village bonfire for disposal. And while there were a few dodgy spots, off-road remained feasible until almost the very end of the month, provided a decent interval was left after each fall of rain.

Mostly dry, still

Totals at the end of the month 2048.9 on the old bike (+186.7), for a total of 186.7 miles for the month, 4372 YTD.

It was like that when I found it

Apart from a long ride to visit friends between Christmas and the New Year (partly into the teeth of a small gale on the way back), December's rides were at most into town. The main highlights were infrastructure related, like the unofficial opening of a stretch of the segregated route into town that had been fenced off for nearly a month; and, of course, an anniversary visit to the Abbey bridge to see that the desire line was not being thwarted by red tape - just that, as last year, the going was a bit soft just at the moment.

Desire line one year on

Totals at the end of the month 2279 on the old bike (+230.1), 175.96 on the folder (+16.2) for a total of 246.3 miles for the month, 4618 for the year; almost 10% more than my previous best of 4215 miles in 2014 when cycle commuting 19 miles was a regular thing. To think that I worried about retirement taking that base-load away, and leaving me lacking exercise!

Sunday, January 01, 2023

AltCover - 5 years on : what happened in 2022

2022 was a comparatively quite year, only 8 releases in all, mostly bugfixing, tracking compiler changes, or working around places where I put Mono.Cecil under unexpected stress, and have to work around until it gets a next release; but with a lot of changes in processes, under the covers. You can read the release notes for the details; this post is aimed at the bits that the end user shouldn't see.

The year started by getting my FxCop wrapper into a state where I could persuade it to process netstandard2.0 assemblies, at least most of the time, thereby enabling me to drop the debug-only net472 builds for libraries. Not all net472 builds could in fact be processed - the Avalonia-based GUI threw intractably even though it could build happily against that target -- The following error was encountered while reading module 'System': Security attribute type does not have a default constructor.

Allowing assembly-level suppression attributes meant that I could also enhance the Gendarme-based scrutiny of the codebase; even if sticking at netstandard2.0 means warnings about not using preferred method overrides from later API levels.

The release of Cake v2 gave me excuse to test and update the relevant APIs -- and another such overhaul in the autumn with Cake 3.0 dropping the deprecated NetCore names.

This was the year to also add dependabot, mostly for keeping the CI build actions up to date, with some prompting about other dependencies; though things like F# updates with compiler changes were actually the most significant unexpected maintenance-level change.

As a maintenance tool, fantomas matured this year, especially with its integration of .editorconfig, to the point that there are only a few "quirky" files where I have to back changes out, mostly with hacky #if/#endif nesting; so it's an on-going tool rather than a once-per release spring-clean. The worst bit is when a compiler generated method with a line-number in its name gets moved, and the static analysis suppression shutting up warning about the bad habits of code generators has to be updated.

The already massive Fake build script also increased its level of automation, keeping track of SDK versions via XML parsing of project files, to keep static analysis dependency paths up to date.

Belatedly, after the release in late 2021, the icons for VS2022 became available, and have been incorporated into the visualizer; this was also the year when I dropped the abortive FuncUI stub, and instead started to experiment with the massive changes in Avalonia 11 - that will be something on-going into the coming year!

Having started to centralize build process late in '21 by using Directory.Build.* files, late '22 saw the adoption of central package versioning, which simplifies much of the update process across the multi-solution sprawl. On the upside, while there's only one place to update, the Visual Studio UI doesn't do that, so while it can identify the updates, it's still a manual process at that one point. It also means having to add more verbiage to Nuget.config files intended to consume just-minted packages as part of build validation testing.

The big change at the end was not net7.0 itself (problems with the 7.0.100 release on dotnet test aside), but the way that didn't play well with the Fake CLI tool, or with the Appveyor CI; so I've replaced the former with net7.0 built drivers for what were scripts and are now source files within the drivers; and the latter with GitHub for doing things like Coveralls reporting -- redone as the old tool I'd been using stopped working at some point mid-year -- and release to NuGet. Of course with my build versioning having incorporated the AppVeyor build number, I needed to take a gratutious minor version bump as even my GitHub build numbers were lower than the AppVeyor ones. In the end, I took a big break and have (ab-)used NerdBank.GitVersioning, starting with the 1-Jan-23 anniversary release.

In many ways the 7.0.100 fail was a forunate one, as it gave me a reason to improve the AltCover scripting APIs, used extensively by AltCover's own build process, to emit raw property/value pairs rather than just composed command-line arguments; and having dropped support for early Fake5 releases, to use its property/value APIs rather than the composed command-line ones.

One last little bit of build-process work was in sorting out the assertion behaviour of Unquote - it casts about to see what libraries are visible and makes an opinionated choice (with NUnit being at the end of its preferences); a little hacking to catch and re-assert means that I can now do Assert.Multiple of Unquote tests - or take multiple bites at a failure, when Unquote tells me that two long strings differ, NUnit can point at where.