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 announced the first generally available release of the C++ extension for Visual Studio Code, graduating to version 1.0 after debuting way back in April 2016,
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.
Firstly, you need an Ubuntu installation. If you don’t have a physical machine with Ubuntu, you may chose a suitable Virtual Machine, such as VMWare, VirtualBox or Hyper-Visor.
I chose Hyper-V since it is included with Windows 10.
To enable Hyper-V on your Windows installation, Open the “Windows Features” tool and check Hyper-V. If you alse use Visual Studio, you may want to add Windows Hypervisor Platform as well.
A word of advice with regards to storage: Place your VMs on an SSD disk.
Reboot your Windows installation if so instructed.
When ready, Start Hyper-V Manager, and chose Actions | Quick Create… | Ubuntu 18.04.3 LTS
A 1.6Gb download will pursue, so the time depends on your bandwidth.
Before firing up the VM, tweak the new VM config to f.x. 4 CPUs and 8192Mb RAM to give the VM some juice, then power up and go through the base installation.
To manually add the build tools for Ubuntu, open a terminal, and run
sudo apt update
sudo apt install build-essential
The first ensures your VM pull all relevant updates, and the second installs gcc and the suite of build tools for Linux.
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.
program LinuxTest;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
begin
try
try
Writeln('Hello whirled');
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
finally
Write('Press Enter: ');
Readln;
end;
end.
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.
“Today we are thrilled to announce the availability of TypeScript 4.0! This version of the language represents our next generation of TypeScript releases, as we dive deeper into expressivity, productivity, and scalability. If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by adding syntax for static types.”
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.”
When storing data in Azure blob storage, the process of upload a blob is fairly straight forward, and all it takes is setting the access tier to “Archive” to move data to blob storage.
You must be logged in to post a comment.