Friday, October 07, 2022

F# and OpenSilver v1.1

An update to the previous series of posts following the v1.1 stable release of OpenSilver.

The recipe given as before just works, when all packages are updated and the browser project build is done with net6.0. One warning is emitted using the latest (6.0.401) SDK, about the IntermediateOutputPath override. The fix is to create a Directory.Build.props in the browser project directory, and move the two lines added to the project previously to the new file

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <IntermediateOutputPath>shorter file path here</IntermediateOutputPath>
    <BaseIntermediateOutputPath>$(IntermediateOutputPath)</BaseIntermediateOutputPath>
  </PropertyGroup>
</Project>

While the System.Windows.Application.LoadComponent API now exists, it requires build-time XAML compilation, and that the named class which it decorates exists in the same assembly, so at this time would only make an adjustment to the C# assembly, replacing the constructor InitializeComponent call with one to LoadComponent, but leaving the same inheritance in the F# layer.

It is possible that the 2.0 release will allow XAML compilation in the F# layer, but on-the-fly compilation seems not to be on the cards.

Also, in language independent mode, the ImageBrush and ImageSource APIs used by the original Silverlight AstroClock are now present. Alas, while that means uncommenting that XAML clause can be done without compile or runtime error, the interesting bits are marked NotImplemented, and live in a "work in progress" source folder, so there is currently no point in doing so.

The resulting code for running with v1.1 can be found here.

Sunday, October 02, 2022

Q3 Cycling

Hot and parched for the first two months, then cooler and damper. This meant a fair bit of riding when it was comfortable to do so, and a collapse in September.

Fen Road, Fenstanton

July was mostly business rides or enjoying the sunshine locally, with one long ride up to St. Ives at the start of the really hot spell mid-month. Notably, the month ended with the arrival of the "Our Place in Space" exhibition, which straggled from Midsummer Common, all the way to Waterbeach, with a return ride that time down Mere Way.

Inner System

Totals at the end of the month 1213.7 on the old bike (+48.8), 1438.7 on the new (+515.3), for a total of 564.1 miles for the month, 2803 YTD.

Ely in the distance

Early in the month, I did a ride through Aldreth, north through Witcham to Coveney, before returning, adding the northernmost point of the limits map. This was in the driest part of the summer, and there were signs of wildfires on Grunty Fen that looked like stubble burning had made a comeback. The dry weather also gave chance to see what Cow Lane was like in the dry (and how not-green Horse River Green had become).

I did the space ride a couple more times, to get pictures when there were fewer other folk around, exploring also the adequate (for during the day) cyclepath along the A10 from Waterbeach to Milton, and then towards the end of the month, riding up to St Ives again, up to Houghton and Wyton, before riding the St Ives perimeter road, gaining another bit of limits; then passing a major crash on the A14 and getting my photos onto the BBC news website..

Houghton Mill

Totals at the end of the month 1264.9 on the old bike (+51.2), 1913.1 on the new (+474.4), and 159.76 for the folder (+38.8) for a total of 564.4 miles for the month, 3368 YTD.

Rivey Hill West - the dry way up

Before the weather completely broke, I made another Linton to Gt Chesterford run, finding a third bridleway, and the dry way up Rivey Hill; but after a ride to explore some new trails and find lunch on my birthday, the weather broke -- some rain, but mostly cooler, so most of the rides for the rest of the month were pure A-to-B, including going to hear the city's proclamation of the new King.

Proclamation

The only long ride was the Camcycle/CTC byways and highways ride around Cambridge at the end of the month, and that mostly by virtue of having to get to and from the start in addition to the circuit (which was around the length of a pretty-way each way circuit-commute to the Science Park, if not quite the same track).

Totals at the end of the month 1541 on the old bike (+276.1), 2045.7 on the new (+132.6) for a total of 408.7 miles for the month, 3777 YTD, having passed last year's whole-year total during the group ride.