Mads Torgersen writes: With every new version of C# we strive for greater clarity and simplicity in common coding scenarios, and C# 9.0 is no exception. One particular focus this time is supporting terse and immutable representation of data shapes.
It is always fun to play with new toys! This article from Julio Sampaio introduces you to Blazor – Web pages done in C#.
Blazor stands for Browser + Razor, which gives you an idea of what’s behind the new framework. Razor is the ASP.NET programming syntax that Microsoft uses to create its C# (or VB.NET) dynamic pages. Now, you can create web applications using only C# and run them in a web browser.
Microsoft ships .NET 5.0 Release Candidate 1 (RC1). It is a near-final release of .NET 5.0, and the first of two RCs before the official release in November. RC1 is a “go live” release; you are supported using it in production.
Note that you can install PAServers for both Rio and Sydney. Just remember to edit the paserver.config and change the default port number for one of them.
Install it to a folder of your liking, as per the instructions in the link and start ./paserver and enter the (optional) password you want the PAServer to use.
To find the IP address of your local Ubuntu VM, open a terminal and run
ip addr show
The IP address we are looking for is in address 2 – in this case: 172.17.202.68
When you first try to compile a Linux app, start with something simple like a console application.
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
Write('Press Enter: ');
On the first ever compile, the IDE will prompt you for a connection profile.
Since we didn’t change the configuration, all we need is to fill in the IP address for the host name. If you entered a password when starting the PAServer, that password is needed here. Remember to click on Test Connection to verify that the PAServer is reachable.
On the first connection, the IDE will download the SDK through the PAServer. This takes a little while and the progress is presented on a desktop-always-on-top progress dialog which is somewhat annoying if you want to do something else while waiting.
After it is complete, you will have a collection of files that allows the linker to find the right link targets for your Ubuntu host.
At this point, your simple console app should be ready to run. It will compile, link, and then upload it to the Ubuntu VM and start it through the PAServer.
By default, it seems that we won’t get to see the actual console where the app runs when run through PAServer, so if you want to run it manually – locate the uploaded file on your installation. It will typically reside under a long path that reflects the name of your connection and your Windows username. The PAServer folder will be in the same folder where you installed the PAServer-20.0 (if you are using 10.3.3).
Under scratch-dir, you find the folders for your winuser-connection combos.
Under there again, you will find a folder that matches your Delphi project name, and in that folder your executable which you can start with “./exename”.
At this point, you should be able to do the same.
The next step is to download FMX for Linux via GetIt. Then you can get started on something beautiful like this 😎 File | New | Multi-device application – change target to Linux 64-bit and run!
Postscript: I have also done this on VirtualBox, but when comparing Hyper-V and VirtualBox it is clear that Hyper-V is much better at managing HW resources – preventing the constant buzz of the CPU cooling fan which was quite annoying when using VirtualBox.
As unusual programming languages go, this one actually is pretty amazing.
It adds units of measure to the number.
“One day Alan Eliasen read a fart joke and got so mad he invented a programming language. 20 years later Frink is one of the best special purpose languages for dealing with units.“But why do we need a language just for dealing with units?” Glad you asked! Intro to Units A unit is the physical property a number represents, like distance or time. We almost always are talking about SI units, or Système international.”