- .qcow2 - KVM type Virtual Machines
- .vmdk - VMware and VirtualBox and ESXi
- .vdi - VirtualBox
- .vhdx - Microsoft Hyper-V
- .vhd - Azure requires fixed size
module Dump | |
// assuming you have LinqPad.Runtime nuget package installed, | |
// dumpH function will produce a html file that knows how to refresh itself | |
// at every 'interval' milliseconds based on the interval value in the live.js | |
// source code given below. install and run dotnet-serve global tool with | |
// dotnet-serve -o | |
// and you'll have a browser page showing your html dump. it will refresh automatically | |
// every time dumpH is called from your code. | |
let liveJs = | |
""" |
type Branch<'a, 'b> = | |
{ value: 'a | |
children: Tree<'a, 'b> seq } | |
and Tree<'a, 'b> = | |
| Branch of Branch<'a, 'b> | |
| Leaf of 'b | |
type PrinterContext<'a, 'b> = | |
abstract member branchToString: 'a -> string |
Valid as of September 2020
note: if you have shell access and want to automatically renew, follow the steps on this page instead
Much of the current documentation on this from LetsEncryt and Godaddy suggests that this is a very hard thing to do - but I'm okay with spending 10 minutes every 2-3 months for a free, quality SSL certificate. If you are too, here's how I do it.
module GADTMotivation | |
(* | |
Here is a simple motivational example for GADTs and their usefulness for library design and domain modeling. Suppose we | |
need to work with settings which can be displayed and adjusted in a GUI. The set of possible setting "types" is fixed | |
and known in advance: integers, strings and booleans (check-boxes). | |
The GUI should show an example value for each possible setting type, e.g. 1337 for an integer setting and "Hello" for a | |
string setting. How can we model this small domain of setting types and computing example values? | |
*) |
// SRTP: Statically Resolved Type Parameters | |
// https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/generics/statically-resolved-type-parameters | |
// SRTP Allows for pulling members out of types that where the member is named and typed the same | |
// In this example SRTP will be used to pull out the 'First: string' and 'Last: string' members | |
// from different types | |
// One example of SRTP in the F# Base Class Library is the (+) operator. | |
// You'll see that it has this type signature: |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
- Create a bare clone of the repository.
(This is temporary and will be removed so just do it wherever.)
git clone --bare [email protected]:usi-systems/easytrace.git
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.