What is this?
An editor for ghūl, a statically typed language that targets .NET. Edit the program, then press Ctrl+Enter or the run button to compile and run it. Problems and output appear in the pane below.
This is for a whole program. To try a line or a definition at a time, and keep what each one defined, use the REPL.
While you type
The ghūl compiler is analysing what you write, so the errors, hovers, completions and inlay hints are the same ones you would get in an IDE rather than an approximation of them. The dot in the top right says whether that analyser is connected.
When you run
Your code is compiled on the server, and the assembly it produces is sent back and executed in this page, on the .NET WebAssembly runtime. Nothing you write is ever run on the server - which is also why a program here cannot open a file or a socket, having neither a filesystem nor a network underneath it.
What you can call
A small fixed set of .NET reference assemblies rather than the whole framework: the core types, the console, collections, regular expressions and tasks, plus the ghūl runtime and ghul.raster. Anything outside that set will not compile, so this is a narrower .NET than a real project has.
The service is small and shared, so it can ask you to wait a moment.
Drawing
ghul.raster
is here as well as the runtime, so a program can draw into an image and
write a PNG. Call show on it and the picture appears over
the editor, where you can save it.
Keeping what you write
What you type is kept in this browser and comes back when you return,
so closing the tab loses nothing. File opens a
.ghul file from your machine and saves back to it - or, in
a browser without that, saves a copy to your downloads.
For a real project, start from ghul-repository-template, which has the build, tests and CI wired up already - and the whole framework rather than the subset above.
Source and issues for this page: degory/ghul-playground.