An open API service indexing awesome lists of open source software.

https://github.com/bryjen/mlang-compiler

Compiler toolchain for the Monkey programming language in .NET
https://github.com/bryjen/mlang-compiler

compiler dotnet fsharp monkeylang roslyn

Last synced: about 1 month ago
JSON representation

Compiler toolchain for the Monkey programming language in .NET

Awesome Lists containing this project

README

          




MonkeyLang







A toolchain for the Monkey programming language on the .NET platform.


Note that this project is still under active developement.

 
A CLI tool for the Monkey programming language that runs on .NET.
Monkey is a general-purpose, minimal, procedural language with first-class functions.
With a robust toolchain and tight .NET integration, it offers a feature rich platform with an emphasis on rapid prototyping.

 
#### Easy to install

```
dotnet tool install --global bryjen.monkey
```
No bootstrapping or building from source required, all you need is a compatible .NET runtime installed.

 
#### Development experience first
```
error: Invalid generic type.
┌─ C:\Users\Public\Program.mk:1:22
|
0 | Result>
| ^ Expected a Comma ',', or a GreaterThan '>''.
```
Inspired by the error handling and error messages of modern functional languages (OCaml, F#, Rust, Gleam, etc.), the toolchain is developed to make writing and debugging as stress-free and predictable as possible.

 
#### Dotnet Interop
```csharp
// csharp interop example
let builder = WebApplication.CreateBuilder(args);
let app = builder.Build();

let middleware = async fn(HttpContext context, Func next) {
// preprocessing
await next();
// postprocessing
};

app.Use(middleware);
app.Run();
```
With first-class .NET support, Monkey can seamlessly use countless C#/F#/VB.NET libraries.
Monkey can also transpile into C#, allowing you to see how your Monkey code translates to C#.